package com.mk.enums;

import org.osgl.util.S;

/**
 * Created by cc on 2016/11/19 0019.
 */

@SuppressWarnings("unused")
public enum GlobalValues {
    CHARSET_UTF8("UTF-8", "默认编码"),
    SMS_CODE("sms-code", "短信验证码缓存key"),
    DEFAULT_PASSWORD("life9090", "默认密码"),
    // region 有效无效
    COMMON_1("1", "正常"),
    COMMON_0("0", "无效"),
    //endregion

    //region 详情状态 同订单状态 odstatus 订单详情状态 0-待付款1-待发货(已付款)2-待收货3-已收货4-已完成
//    OD_STATUS_0("0","待付款"),
//    OD_STATUS_1("1","待发货(已付款)"),
//    OD_STATUS_2("2","待收货"),
//    OD_STATUS_3("3","已收货"),
//    OD_STATUS_4("4","已完成"),
    //endregion
    //region orderstatus 订单状态 0-待付款1-待发货(已付款)2-待收货3-已收货4-已完成
    ORDER_STATUS_0("0","待付款"),
    ORDER_STATUS_1("1","待发货"),
    ORDER_STATUS_2("2","待收货"),
    ORDER_STATUS_3("3","已收货"),
    ORDER_STATUS_4("4","已完成"),
    ORDER_STATUS_5("5","已取消"),
    ORDER_STATUS_6("6","售后完成"),
    //endregion
    //region salestatus售后状态(0-正常1-审核中)
    ORDER_SALE_STATUS_0("0","正常"),
    ORDER_SALE_STATUS_1("1","审核中"),

    //region 客户状态
    Z_MEM_STATE_0("0", "待审核"),
    Z_MEM_STATE_1("1", "通过"),
    Z_MEM_STATE_2("2", "驳回"),

    //region 客户类型
    Z_MEM_LX_0("0", "待确认"),
    Z_MEM_LX_1("1", "会长"),
    Z_MEM_LX_2("2", "副会长"),
    Z_MEM_LX_3("3", "会员"),
    //endregion
    //region 支付方式
    Z_PAYTYPE_0("0","微信"),
    Z_PAYTYPE_1("1","银联"),
    Z_PAYTYPE_2("2","线下支付"),
    //endregion
    Z_FLOW_OFFLAG_0("0","支付"),
    Z_FLOW_OFFLAG_1("1","售后"),

    //region 是否首单
    Z_ISFIRST_0("0","否"),
    Z_ISFIRST_1("1","是"),
    //region 结算单是否已支付
    Z_MB_FLOW_PAY_0("0","未支付"),
    Z_MB_FLOW_PAY_1("1","已支付"),
    //region 结算单类型
    Z_MB_FLOW_TYPE_0("0","普通奖励"),
    Z_MB_FLOW_TYPE_1("1","会长奖励"),


    //region 投诉来源
    CP_COMPLAIN_FROM_1("1", "粉丝投诉"),
    CP_COMPLAIN_FROM_2("2", "商家投诉"),
    //endregion

    //region 投诉状态
    CP_COMPLAIN_STATE_0("0", "待处理"),
    CP_COMPLAIN_STATE_1("1", "已处理"),
    //endregion

    //region 投诉类型
    CP_COMPLAIN_TYPE_1("1", "网页包含欺诈信息"),
    CP_COMPLAIN_TYPE_2("2", "网页包含色情信息"),
    CP_COMPLAIN_TYPE_3("3", "网页包含暴力恐怖信息"),
    CP_COMPLAIN_TYPE_4("4", "网页包含政治敏感信息"),
    //endregion

    //region 消息状态
    SHOPROLE_BELONGTIME_7("7", "一周"),
    SHOPROLE_BELONGTIME_30("30", "一月"),
    SHOPROLE_BELONGTIME_365("365", "一年"),
    //endregion

    // region
    CP_CONFIG_TXSXF("TXSXF", "提现手续费"),
    CP_CONFIG_TXMIN("TXMIN", "最小提现金额"),
    CP_CONFIG_TXMAX("TXMAX", "最大提现金额"),
    CP_CONFIG_CJGBSJ("CJGBSJ", "抽检关闭时间"),
    CP_CONFIG_ISOPENUSERROLE("ISOPENUSERROLE", "是否应用用户权限"),
    CP_CONFIG_TMLEVEL("TMLEVEL", "模板级别"),
    CP_CONFIG_USERLEVEL("USERLEVEL", "用户级别"),
    CP_CONFIG_PDUNIT("PDUNIT", "商品单位"),
    CP_CONFIG_DISCOUNT("DISCOUNT", "订单统一折扣"),
    CP_CONFIG_FSCALE("FSCALE", "首单抽佣比例"),
    CP_CONFIG_RSCALE("RSCALE", "返单抽佣比例"),
    // endregion

    //region 流水类别
    CP_FLOW_TYPE_0("0", "收入"),
    CP_FLOW_TYPE_1("1", "支出"),
    //end

    //region 流水类别
    CP_YMONEY_TYPE_0("0", "押金"),
    CP_YMONEY_TYPE_1("1", "退押"),
    //end
    //region 平台收入流水类型
    WALLET_PLATFORM_FLOW_0("0", "活动支付"),
    WALLET_PLATFORM_FLOW_1("1", "会员支付"),
    WALLET_PLATFORM_FLOW_2("2", "模板支付"),
    WALLET_PLATFORM_FLOW_3("3", "手续费收入"),
    WALLET_PLATFORM_FLOW_4("4", "押金收入"),
    WALLET_PLATFORM_FLOW_5("5", "佣金支出"),
    WALLET_PLATFORM_FLOW_6("6", "活动退款"),
    WALLET_PLATFORM_FLOW_7("7", "商家提现"),
    WALLET_PLATFORM_FLOW_8("8", "手续费支出"),
    WALLET_PLATFORM_FLOW_9("9", "押金退回"),
    //end

    //region 店铺流水类型
    WALLET_FLOW_TYPE_1("1", "活动收入"),
    WALLET_FLOW_TYPE_2("2", "活动退款"),
    WALLET_FLOW_TYPE_3("3", "佣金支出"),
    WALLET_FLOW_TYPE_4("4", "商家提现"),
    WALLET_FLOW_TYPE_5("5", "提现手续费"),
    //end region

    // region 是否
    FLAG_0("0", "否"),
    FLAG_1("1", "是"),
    //endregion

    //region 消息状态
    MSSTATE_0("0", "未读"),
    MSSTATE_1("1", "已读"),
    MSSTATE_2("2", "删除"),
    //endregion

    //region 消息类型
    MOVEMENT_PARA_TYPE_0("0", "比例分佣"),
    MOVEMENT_PARA_TYPE_1("1", "固定金额"),
    MOVEMENT_PARA_TYPE_9("9", "不分佣"),
    //endregion
    //region 资源标签
    RESOURCETAG_1("1", "建设中"),
    RESOURCETAG_2("2", "新功能"),
    //endregion


    //region 消息类型
    MSTYPE_0("0", "系统消息"),
    MSTYPE_1("1", "交易消息"),
    //endregion

    //region 通用正常、失效状态
    COMMONSTATE_1("1", "正常"),
    COMMONSTATE_0("0", "失效"),
    //endregion

    //region 用户类型
    USERTYPE_0("0", "平台"),
    USERTYPE_1("1", "用户"),
    //endregion

    //region 模板类型
    TEMPLATE_STATE_0("0", "草稿"),
    TEMPLATE_STATE_1("1", "正常"),
    TEMPLATE_STATE_2("2", "下架"),
    //endregion

    //region 店铺状态
    CPSHOP_STATE_0("0", "草稿"),
    CPSHOP_STATE_1("1", "正常"),
    CPSHOP_STATE_2("2", "失效"),
    //endregion

    //region 认证类型
    SHOP_AUTHTYPE_0("0", "身份证"),
    SHOP_AUTHTYPE_1("1", "营业执照"),
    SHOP_AUTHTYPE_2("2", "未认证"),
    //end region

    //region 权限用的认证方式
    SHOP_ROLE_AUTHTYPE_0("0", "身份证"),
    SHOP_ROLE_AUTHTYPE_1("1", "营业执照"),
    SHOP_ROLE_AUTHTYPE_2("2", "未认证"),
    SHOP_ROLE_AUTHTYPE_3("3", "不限"),
    //endregion


    //region 客服方式
    SHOP_SERVICETYPE_0("0", "400客服"),
    SHOP_SERVICETYPE_1("1", "专属客服"),
    SHOP_SERVICETYPE_2("2", "客服群"),
    //endregion

    //region 模板等级
    TEMPLATE_LEVEL_0("0", "免费模板"),
    TEMPLATE_LEVEL_1("1", "付费模板"),
    TEMPLATE_LEVEL_2("2", "VIP模板"),
    //endregion

    // region 模版运行环境
    MODE_PCEDIT("pc-edit", "PC端编辑"),
    MODE_RUNTIME("runtime", "运行模式"),
    MODE_H5("h5", "h5项目"),
    MODE_MOBILEEDIT("mobile-edit", "移动端编辑"),
    MODE_PCPREVIEW("pc-preview", "PC端预览"),
    // endregion

    //region 资源类型
    RESOURCE_IMAGE("IMAGE", "图片资源"),
    RESOURCE_VIDEO("VIDEO", "视频资源"),
    RESOURCE_VOICE("VOICE", "音频资源"),
    RESOURCE_GOMEZ("GOMEZ", "文字素材"),
    RESOURCE_OFFICE("OFFICE", "文档"),
    RESOURCE_EFECT("EFECT", "特效资源"),
    //endregion

    //region 模板场景
    TEMPLATE_SCENE_TMPX("pshare", "拼享"),
    TEMPLATE_SCENE_TMYJ("money", "佣金"),
    TEMPLATE_SCENE_TMFX("share", "分享"),
    TEMPLATE_SCENE_TMKJ("knife", "砍价"),
    TEMPLATE_SCENE_TMMS("seckill", "秒杀"),
    TEMPLATE_SCENE_TMSY("tryuse", "试用"),
    TEMPLATE_SCENE_ENROLL("enroll", "报名"),
    TEMPLATE_SCENE_PRESELL("presell", "预售"),
//    distribution: '分销活动',
//    dial: '幸运大转盘',
//    nine: '九宫格',
//    scratch: '刮刮乐',
//    tiger: '老虎机',
//    shake: '摇一摇',
//    smash: '砸金蛋',
//    machine: '扭蛋机',
//    quizs: '益智游戏',
//    enroll: '报名',
//    signup: '签到',
//    coupon: '优惠券',
//    vote: '投票',
//    freind: '亲情问候',
//    sheet: '传单',
//    askpage: '调查问卷',
//    wish: '心愿单',
    //endregion

    //region 活动状态
    MOVEMENT_STATUS_0("0", "关闭"),
    MOVEMENT_STATUS_1("1", "未开始"),
    MOVEMENT_STATUS_2("2", "进行中"),
    MOVEMENT_STATUS_3("3", "已结束"),
    //endregion

    //region 活动团状态
    MOVEMENT_TEAM_STATE_0("0", "开团失败"),
    MOVEMENT_TEAM_STATE_1("1", "未开团"),
    MOVEMENT_TEAM_STATE_2("2", "已开团"),
    MOVEMENT_TEAM_STATE_3("3", "团成功"),
    MOVEMENT_TEAM_STATE_4("4", "团失败"),
    MOVEMENT_TEAM_STATE_5("5", "已核销"),
    //endregion

    //region 活动参与表状态
    MOVEMENT_RECORD_STATE_1("1", "待支付"),
    MOVEMENT_RECORD_STATE_2("2", "已支付"),
    MOVEMENT_RECORD_STATE_3("3", "待核销"),
    MOVEMENT_RECORD_STATE_4("4", "已核销"),
    MOVEMENT_RECORD_STATE_5("5", "失败待退款"),
    MOVEMENT_RECORD_STATE_6("6", "失败已退款"),
    MOVEMENT_RECORD_STATE_7("7", "到期关闭"),
    //endregion

    //regin 砍价记录状态
    KNIFE_RECORD_STATE_1("1", ""),
    KNIFE_RECORD_STATE_2("2", "待支付"),
    KNIFE_RECORD_STATE_3("3", "待核销"),
    KNIFE_RECORD_STATE_4("4", "到期关闭"),
    KNIFE_RECORD_STATE_5("5", "已核销"),
    //endregin 砍价记录状态

    ACTIVE_PAY_TYPE_0("0", "线上支付,0或空"),
    ACTIVE_PAY_TYPE_1("1", "线下支付"),
    ACTIVE_PAY_TYPE_2("2", "不支付"),

    IS_SYSTEM_0("0", "自定义"),
    IS_SYSTEM_1("1", "系统"),

    //region 图片组件
    IMAGE_CONFIG_SYLBT("SYLBT", "首页轮播图"),
    IMAGE_CONFIG_SYDH("SYDH", "首页导航"),
    //endregion
    //提现申请状态 (1.待审核，2.支付中，3.支付成功，4.支付失败，5.审核驳回)
    WW_STATE_1("1", "待审核"),
    WW_STATE_2("2", "支付中"),
    WW_STATE_3("3", "支付成功"),
    WW_STATE_4("4", "支付失败"),
    WW_STATE_5("5", "审核驳回"),

    PR_TYPE_1("1", "店铺会员购买"),
    //region 订单
    //订单类型
    ORDER_TYPE_1("1", "会员"),
    ORDER_TYPE_2("2", "模板"),
    ORDER_TYPE_3("3", "线下订单"),

    //endregion
    //支付记录支付状态
    PAY_RECORD_STATUS_1("1", "待支付"),
    PAY_RECORD_STATUS_2("2", "已支付"),
    PAY_RECORD_STATUS_3("3", "已完成"),
    PAY_RECORD_STATUS_4("4", "支付失败"),
    PAY_RECORD_STATUS_5("5", "支付状态异常"),


    //记录支付状态
    RETURN_RECORD_STATUS_1("1", "退款中"),
    RETURN_RECORD_STATUS_2("2", "已退款"),
    RETURN_RECORD_STATUS_3("3", "退款失败"),

    //region 支付相关
    PAY_TYPE_WEIXIN("WX", "微信支付"),
    PAY_TYPE_UNION("UN", "银联支付"),


    WEIXINRESULT_SUCCESS("SUCCESS", "微信返回成功标识"),
    WEIXINRESULT_FAIL("FAIL", "微信返回失败标识"),
    //endregion 支付相关

    //region 用户来源
    USERSOURCE_0("0", "美多拼用户"),
    USERSOURCE_1("1", "直供用户"),
    USERSOURCE_2("2", "同一手机"),
    USERSOURCE_3("3", "同一微信"),
    //region 商品状态
    Z_PD_STATE_0("0", "草稿"),
    Z_PD_STATE_1("1", "上架审核"),
    Z_PD_STATE_2("2", "驳回"),
    Z_PD_STATE_3("3", "上架"),
    Z_PD_STATE_4("4", "下架");
    //endregion

    private final String value;
    private final String desc;

    GlobalValues(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static GlobalValues getlobalValues(String value) {
        for (int i = 0; i < GlobalValues.values().length; i++) {
            if (S.eq(GlobalValues.values()[i].value(), value)) {
                return GlobalValues.values()[i];
            }
        }
        return null;
    }

    public boolean eq(String v) {
        return S.eq(v, value);
    }

    public String value() {
        return this.value;
    }

    @Override
    public String toString() {
        return this.value;
    }

    public String desc() {
        return this.desc;
    }
}
